package com.xbongbong.paas.pojo.dto;

import com.xbongbong.paas.domain.entity.ext.ConditionsEntityExt;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * @author: wufeng
 * @date: 2018/8/21 11:11
 * @desrcption: 流转条件
 */
@Getter
@Setter
@ToString
public class ProcessConditionUpdateDTO implements Serializable {
    private static final long serialVersionUID = -1364215869563611692L;


    /**
     * 流转条件id
     */
    private Long id;

    /**
     * 流转条件，1：使用流转条件判断；0：使用else条件
     */
    @NotNull(message = "{dto.msg.processConditionUpdate.conditionType.NotNull}")
    private Integer conditionType;
    /**
     * 前端唯一标识
     */
    @NotBlank(message = "{dto.msg.processConditionUpdate.uid.NotBlank}")
    private String uid;

    private String sourceUId;

    private String targetUId;

    /**
     * 来源节点/上级节点id的箭头起始位置，上下左右四个位置
     */
    private String fromPort;


    private List<ConditionsEntityExt> condition;

    ProcessConditionUpdateDTO(){
        condition = new ArrayList<>();
    }
}
